//
//  UIFactory.swift
//  sinaWeibo
//
//  Created by 浅爱 on 16/3/19.
//  Copyright © 2016年 y. All rights reserved.
//

import UIKit

// 抽象类
// 所有的UI控件都是通过这个类进行实例化的
// NSNumber 类 就是使用抽象工厂设计模式来实现的

class UIFactory {
    
    class func labelWith(text: String, textColor: UIColor, fontOfSize: CGFloat) -> UILabel {

        let lb = UILabel.labelWith(text, textColor: textColor, fontOfSize: fontOfSize)
        
        
        return lb
        
    }

    
    class func buttonWithImage(imageName: String, backImageName: String) -> UIButton {
    
        let btn = UIButton.buttonWithImage(imageName, backImageName: backImageName)
        
        
        return btn
        
    }
    
    
    class func buttonWithTitle(title: String, backImageName: String, textColor: UIColor, fontOfSize: CGFloat) -> UIButton {
        
        let btn = UIButton.buttonWithTitle(title, backImageName: backImageName, textColor: textColor, fontOfSize: fontOfSize)
        
        
        return btn
        
    }
    
    
    
}
